#include<iostream>
using namespace std;

int mx[] = {0,1};
int my[] = {1,0};
int n,m,h_x,h_y;
long long count;


void dfs(int x,int y){
    if((x==h_x&&y==h_y)
    ||(x==h_x-2&&y==h_y-1)||(x==h_x-1&&y==h_y-2)
    ||(x==h_x+2&&y==h_y-1)||(x==h_x-1&&y==h_y+2)
    ||(x==h_x-2&&y==h_y+1)||(x==h_x+1&&y==h_y+2)
    ||(x==h_x+2&&y==h_y+1)||(x==h_x+1&&y==h_y-2)
    ) return;
    if(x==n&&y==m) {
        count++;
    }
    if(y<m)dfs(x,y+1);    
    if(x<n)dfs(x+1,y); 
}

int main(){
    scanf("%d%d%d%d",&n,&m,&h_x,&h_y);
    dfs(0,0);
    printf("%d",count);
    return 0;
}